<!--
 功能描述：论坛修改
 开发人：wanghw
 开发日期：2019/11/12
 -->
<template lang="pug">
  kalix-dialog.user-add(bizKey="Message" ref="kalixBizDialog" v-bind:formModel.sync="formModel" v-bind:targetURL="targetURL")
    div.el-form(slot="dialogFormSlot" style=" width:60%;margin:auto;")
      el-input(v-model="formModel.uid" type="hidden")
      el-form-item(label="评论时间" prop="messageDateTime" v-bind:label-width="labelWidth" v-bind:rules="rules.messageDateTime")
        kalix-date-picker(v-model="formModel.messageDateTime" style="width:80%" type="date")
      el-form-item(label="评论标题" prop="messageTitle" label-width="120px" v-bind:rules="rules.messageTitle")
        el-input(v-model="formModel.messageTitle" style="width:80%")
      el-form-item(label="评论内容" prop="messageContent" label-width="120px" v-bind:rules="rules.messageContent")
        el-input(v-model="formModel.messageContent" style="width:80%")
</template>

<script type="text/ecmascript-6">
  import FormModel from './model'
  import {MessageURL} from '../../config.toml'

  export default {
    name: 'messageEdit',
    data() {
      return {
        formModel: Object.assign({}, FormModel),
        rules: {
          content: [{required: true, message: '请输入修改的评论内容', trigger: 'blur'}],
          score: [{required: true, message: '请输入修改的评分', trigger: 'blur'}]
        },
        targetURL: MessageURL,
        labelWidth: '110px',
        items: [],
        options: []
      }
    },
    mounted() {
    },
    methods: {
      init(dialogOption) {
        console.log('---------this.formModel.uid------------', this.formModel.uid)
      }
    }
  }
</script>

<style scoped>

</style>
